#! /bin/bash

set -e

echo 'begin deploy wechat'

echo 'current dir:'
pwd
docker ps

echo 'pull latest sourceCode'

git pull

# 先构建前端项目
cd ./client

npm config set registry https://registry.npm.taobao.org/ && \
npm i && \
npm config set registry https://registry.npmjs.org/

npm run build

cd ../

docker-compose up
